# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Maintainer: Christian Heusel <gromit@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>

pkgname=devtools
epoch=1
pkgver=1.0.4
pkgrel=1
pkgdesc='Tools for Arch Linux package maintainers'
arch=('any')
license=('GPL')
url='https://gitlab.archlinux.org/archlinux/devtools'
depends=(
  arch-install-scripts
  awk
  bash
  binutils
  coreutils
  diffutils
  fakeroot
  findutils
  grep
  jq
  openssh
  parallel
  rsync
  sed
  util-linux

  breezy
  git
  mercurial
  subversion
)
makedepends=(
  asciidoc
#  shellcheck
)
optdepends=('btrfs-progs: btrfs support')
replaces=(devtools-git-poc)
source=(https://gitlab.archlinux.org/archlinux/devtools/-/releases/v${pkgver}/downloads/devtools-${pkgver}.tar.gz{,.sig}
    devtools-loong64-1.0.4.patch)
validpgpkeys=(
  '4AA4767BBC9C4B1D18AE28B77F2D434B9741E8AC' # Pierre Schmitz <pierre@archlinux.org>
  '86CFFCA918CF3AF47147588051E8B148A9999C34' # Evangelos Foutras <foutrelis@archlinux.org>
  '8FC15A064950A99DD1BD14DD39E4B877E62EB915' # Sven-Hendrik Haase <svenstaro@archlinux.org>
  'A2FF3A36AAA56654109064AB19802F8B0D70FC30' # Jan Alexander Steffens (heftig) <heftig@archlinux.org>
  'B81B051F2D7FC867AAFF35A58DBD63B82072D77A' # Sébastien Luttringer <seblu@archlinux.org>
  '6645B0A8C7005E78DB1D7864F99FFE0FEAE999BD' # Allan McRae (Developer) <allan@archlinux.org>
  'E240B57E2C4630BA768E2F26FC1B547C8D8172C8' # Levente Polyak <anthraxx@archlinux.org>
)
sha256sums=('dded4b47f669751cf86367284c9adabbec92321f5fb0fc684d4fcc0e039c6719'
            'SKIP'
            '1ad1e4de88d9f7e1ae2de9b7ab4a494634e39075ee04bb497241cc5e154d1a00')
b2sums=('bfc3727fe70dbae1333d491a48342955230072830ab9cb7a308992eaba7127202ed6a3489398f86540ebc213b2d530d92ae7485fb02241a67f7d71c496088123'
        'SKIP'
        '3cde8f2e4ca9e69b7d9a7159391896511dbd5b2f1f9f575c49c790ce330b8749eba6c7c1f69eebe33d632a245feacddd8fb84e7f79efbf5bab7d9ea55bf7d15f')

prepare() {
  cd ${pkgname}-${pkgver}
  patch -p1 -i $srcdir/devtools-loong64-1.0.4.patch
}

build() {
  cd ${pkgname}-${pkgver}
  make BUILDTOOLVER="${epoch}:${pkgver}-${pkgrel}-${arch}" PREFIX=/usr
}

package() {
  cd ${pkgname}-${pkgver}
  make PREFIX=/usr DESTDIR="${pkgdir}" install
}

# vim: ts=2 sw=2 et:
